package org.csmzxy.class233;

class MyRunnable01 implements Runnable{
    /**
     * 重写run()方法,实现线程的执行逻辑
     */
    @Override
    public void run(){
       //循环输出当前线程的名称
       while (true){
           System.out.println(Thread.currentThread().getName() + "run()方法在运行");
           try {
               Thread.sleep(1000);
           }catch (InterruptedException e){
               e.printStackTrace();
           }
       }
    }
}
